package org.apogee.mil.client.services.admin;

import java.util.ArrayList;
import java.util.List;

import org.apogee.mil.shared.Question;

import com.extjs.gxt.ui.client.data.BaseModel;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("admin")
public interface AdminService extends RemoteService {

	public boolean initialize();
	
	public boolean close();
	
	public boolean addUser(int userid, String username, String passwd, String firstName, String lastName, int accessLevel, String enabled);
	
	public boolean updateUsers(ArrayList<BaseModel> changes);
	
	public ArrayList<BaseModel> getAvailableTests();
	
	public ArrayList<BaseModel> getUsers(int accessLevel);
	
	public List<Question> getQuestions(String test, int numQuestions, int volume, int reviewType);
	
	public boolean updateQuestion(String test, Question question);
	
	public ArrayList<BaseModel> getAccessLevels();
	
	public ArrayList<BaseModel> getGroups();
	
	public boolean updateGroups(ArrayList<BaseModel> changed);
	
	public ArrayList<BaseModel> getTestsFromGroup(String groupId);
	
	public ArrayList<BaseModel> getUsersFromGroup(String groupId);
	
	public boolean updateGroupings(String groupId, ArrayList<BaseModel> changes);
	
	public boolean createTest(String testName);
	
	public ArrayList<BaseModel> getTrainers();
	
	public boolean updateTrainer(int trainerId, ArrayList<BaseModel> changes);
	
	public ArrayList<BaseModel> getAllUsers();
	
}
